<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="format-detection" content="telephone = no">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body style="height: 100%;">
<script>

  //js向客户端本地发数据
  function callAndroidClient(){
    var jsonRoot = {};
    jsonRoot.code = 404;
    jsonRoot.data = {};
    jsonRoot.data.label = "鬼影人间"
    jsonRoot.data.id = 12;
    jsonRoot.data.vip = true;
    var jsonStr = JSON.stringify(jsonRoot);
    //alert(jsonStr);
    window.android.handleJsCall("doWorkA",jsonStr);
  }

  function funMsg(clientJsonObj){
    //接收来自客户端的json对象
    var cmd = clientJsonObj.cmd;
    var code = clientJsonObj.code;
    var data = clientJsonObj.data;
    var msg = data.msg;
    var jsonStr = JSON.stringify(clientJsonObj);
    alert("来自客户端的信息\n\ncmd :"+cmd+"\nmsg :"+msg);
    alert("来自客户端的信息\n\n jsonStr = "+jsonStr);
  }
</script>
<p>------ 基本测试 ------</p>
<button style="font-size: 16px;" onclick="callAndroidClient()">调Android本地方法 传参</button>
</body>
</html>